<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QEvent Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QEvent Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QEvent class is the base class of all event classes. Event
objects contain event parameters. <a href="#details">More...</a></p>

<p>Inherited by <a href="qactionevent.html">QActionEvent</a>, <a href="qchildevent.html">QChildEvent</a>, <a href="qcloseevent.html">QCloseEvent</a>, <a href="qdragleaveevent.html">QDragLeaveEvent</a>, <a href="qdropevent.html">QDropEvent</a>, <a href="qdynamicpropertychangeevent.html">QDynamicPropertyChangeEvent</a>, <a href="qfileopenevent.html">QFileOpenEvent</a>, <a href="qfocusevent.html">QFocusEvent</a>, <a href="qgestureevent.html">QGestureEvent</a>, <a href="qgraphicssceneevent.html">QGraphicsSceneEvent</a>, <a href="qhelpevent.html">QHelpEvent</a>, <a href="qhideevent.html">QHideEvent</a>, <a href="qhoverevent.html">QHoverEvent</a>, <a href="qicondragevent.html">QIconDragEvent</a>, <a href="qinputevent.html">QInputEvent</a>, <a href="qinputmethodevent.html">QInputMethodEvent</a>, <a href="qmoveevent.html">QMoveEvent</a>, <a href="qpaintevent.html">QPaintEvent</a>, <a href="qresizeevent.html">QResizeEvent</a>, <a href="qshortcutevent.html">QShortcutEvent</a>, <a href="qshowevent.html">QShowEvent</a>, <a href="qstatemachine-signalevent.html">SignalEvent</a>, <a href="qstatemachine-wrappedevent.html">WrappedEvent</a>, <a href="qstatustipevent.html">QStatusTipEvent</a>, <a href="qtimerevent.html">QTimerEvent</a>, <a href="qwhatsthisclickedevent.html">QWhatsThisClickedEvent</a> and <a href="qwindowstatechangeevent.html">QWindowStateChangeEvent</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qevent.html#Type-enum">Type</a></b> { None, Timer, MouseButtonPress, MouseButtonRelease, ..., MaxUser }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qevent.html#QEvent">__init__</a></b> (<i>self</i>, Type&#160;<i>type</i>)</li><li><div class="fn" /><b><a href="qevent.html#QEvent-2">__init__</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" /><b><a href="qevent.html#accept">accept</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qevent.html#ignore">ignore</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qevent.html#isAccepted">isAccepted</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qevent.html#setAccepted">setAccepted</a></b> (<i>self</i>, bool&#160;<i>accepted</i>)</li><li><div class="fn" />bool <b><a href="qevent.html#spontaneous">spontaneous</a></b> (<i>self</i>)</li><li><div class="fn" />Type <b><a href="qevent.html#type">type</a></b> (<i>self</i>)</li></ul><h3>Static Methods</h3><ul><li><div class="fn" />int <b><a href="qevent.html#registerEventType">registerEventType</a></b> (int&#160;<i>hint</i>&#160;=&#160;-1)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QEvent class is the base class of all event classes. Event
objects contain event parameters.</p>
<p>Qt's main event loop (<a href="qcoreapplication.html#exec">QCoreApplication.exec</a>()) fetches
native window system events from the event queue, translates them
into QEvents, and sends the translated events to <a href="qobject.html">QObject</a>s.</p>
<p>In general, events come from the underlying window system
(<a href="qevent.html#spontaneous">spontaneous</a>() returns true),
but it is also possible to manually send events using <a href="qcoreapplication.html#sendEvent">QCoreApplication.sendEvent</a>()
and <a href="qcoreapplication.html#postEvent">QCoreApplication.postEvent</a>()
(<a href="qevent.html#spontaneous">spontaneous</a>() returns
false).</p>
<p><a href="qtwebkit-bridge.html#qobjects">QObjects</a> receive
events by having their <a href="qobject.html#event">QObject.event</a>() function called. The
function can be reimplemented in subclasses to customize event
handling and add additional event types; <a href="qwidget.html#event">QWidget.event</a>() is a notable example. By
default, events are dispatched to event handlers like <a href="qobject.html#timerEvent">QObject.timerEvent</a>() and <a href="qwidget.html#mouseMoveEvent">QWidget.mouseMoveEvent</a>().
<a href="qobject.html#installEventFilter">QObject.installEventFilter</a>()
allows an object to intercept events destined for another
object.</p>
<p>The basic QEvent contains only an event type parameter and an
"accept" flag. The accept flag set with <a href="qevent.html#accept">accept</a>(), and cleared with <a href="qevent.html#ignore">ignore</a>(). It is set by default, but don't
rely on this as subclasses may choose to clear it in their
constructor.</p>
<p>Subclasses of QEvent contain additional parameters that describe
the particular event.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="Type-enum" />QEvent.Type</h3><p>This enum type defines the valid event types in Qt. The event
types and the specialized classes for each type are as follows:</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.None</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">Not an event.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.AccessibilityDescription</tt></td>
<td class="topAlign"><tt>130</tt></td>
<td class="topAlign">Used to query accessibility description texts
(<a href="qaccessibleevent.html">QAccessibleEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.AccessibilityHelp</tt></td>
<td class="topAlign"><tt>119</tt></td>
<td class="topAlign">Used to query accessibility help texts
(<a href="qaccessibleevent.html">QAccessibleEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.AccessibilityPrepare</tt></td>
<td class="topAlign"><tt>86</tt></td>
<td class="topAlign">Accessibility information is requested.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.ActionAdded</tt></td>
<td class="topAlign"><tt>114</tt></td>
<td class="topAlign">A new action has been added (<a href="qactionevent.html">QActionEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.ActionChanged</tt></td>
<td class="topAlign"><tt>113</tt></td>
<td class="topAlign">An action has been changed (<a href="qactionevent.html">QActionEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.ActionRemoved</tt></td>
<td class="topAlign"><tt>115</tt></td>
<td class="topAlign">An action has been removed (<a href="qactionevent.html">QActionEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.ActivationChange</tt></td>
<td class="topAlign"><tt>99</tt></td>
<td class="topAlign">A widget's top-level window activation state
has changed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.ApplicationActivate</tt></td>
<td class="topAlign"><tt>121</tt></td>
<td class="topAlign">The application has been made available to the
user.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.ApplicationActivated</tt></td>
<td class="topAlign"><tt>ApplicationActivate</tt></td>
<td class="topAlign">This enum has been deprecated. Use
ApplicationActivate instead.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.ApplicationDeactivate</tt></td>
<td class="topAlign"><tt>122</tt></td>
<td class="topAlign">The application has been suspended, and is
unavailable to the user.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.ApplicationFontChange</tt></td>
<td class="topAlign"><tt>36</tt></td>
<td class="topAlign">The default application font has changed.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QEvent.ApplicationLayoutDirectionChange</tt></td>
<td class="topAlign"><tt>37</tt></td>
<td class="topAlign">The default application layout direction has
changed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.ApplicationPaletteChange</tt></td>
<td class="topAlign"><tt>38</tt></td>
<td class="topAlign">The default application palette has
changed.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QEvent.ApplicationWindowIconChange</tt></td>
<td class="topAlign"><tt>35</tt></td>
<td class="topAlign">The application's icon has changed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.ChildAdded</tt></td>
<td class="topAlign"><tt>68</tt></td>
<td class="topAlign">An object gets a child (<a href="qchildevent.html">QChildEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.ChildInserted</tt></td>
<td class="topAlign"><tt>70</tt></td>
<td class="topAlign">An object gets a child (<a href="qchildevent.html">QChildEvent</a>). <a href="qt3support.html">Qt3Support</a> only, use ChildAdded instead.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.ChildPolished</tt></td>
<td class="topAlign"><tt>69</tt></td>
<td class="topAlign">A widget child gets polished (<a href="qchildevent.html">QChildEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.ChildRemoved</tt></td>
<td class="topAlign"><tt>71</tt></td>
<td class="topAlign">An object loses a child (<a href="qchildevent.html">QChildEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.Clipboard</tt></td>
<td class="topAlign"><tt>40</tt></td>
<td class="topAlign">The clipboard contents have changed
(QClipboardEvent).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.Close</tt></td>
<td class="topAlign"><tt>19</tt></td>
<td class="topAlign">Widget was closed (<a href="qcloseevent.html">QCloseEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.CloseSoftwareInputPanel</tt></td>
<td class="topAlign"><tt>200</tt></td>
<td class="topAlign">A widget wants to close the software input
panel (SIP).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.ContentsRectChange</tt></td>
<td class="topAlign"><tt>178</tt></td>
<td class="topAlign">The margins of the widget's content rect
changed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.ContextMenu</tt></td>
<td class="topAlign"><tt>82</tt></td>
<td class="topAlign">Context popup menu (<a href="qcontextmenuevent.html">QContextMenuEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.CursorChange</tt></td>
<td class="topAlign"><tt>183</tt></td>
<td class="topAlign">The widget's cursor has changed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.DeferredDelete</tt></td>
<td class="topAlign"><tt>52</tt></td>
<td class="topAlign">The object will be deleted after it has
cleaned up.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.DragEnter</tt></td>
<td class="topAlign"><tt>60</tt></td>
<td class="topAlign">The cursor enters a widget during a drag and
drop operation (<a href="qdragenterevent.html">QDragEnterEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.DragLeave</tt></td>
<td class="topAlign"><tt>62</tt></td>
<td class="topAlign">The cursor leaves a widget during a drag and
drop operation (<a href="qdragleaveevent.html">QDragLeaveEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.DragMove</tt></td>
<td class="topAlign"><tt>61</tt></td>
<td class="topAlign">A drag and drop operation is in progress
(<a href="qdragmoveevent.html">QDragMoveEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.Drop</tt></td>
<td class="topAlign"><tt>63</tt></td>
<td class="topAlign">A drag and drop operation is completed
(<a href="qdropevent.html">QDropEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.EnabledChange</tt></td>
<td class="topAlign"><tt>98</tt></td>
<td class="topAlign">Widget's enabled state has changed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.Enter</tt></td>
<td class="topAlign"><tt>10</tt></td>
<td class="topAlign">Mouse enters widget's boundaries.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.EnterEditFocus</tt></td>
<td class="topAlign"><tt>150</tt></td>
<td class="topAlign">An editor widget gains focus for editing.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.EnterWhatsThisMode</tt></td>
<td class="topAlign"><tt>124</tt></td>
<td class="topAlign">Send to toplevel widgets when the application
enters "What's This?" mode.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.FileOpen</tt></td>
<td class="topAlign"><tt>116</tt></td>
<td class="topAlign">File open request (<a href="qfileopenevent.html">QFileOpenEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.FocusIn</tt></td>
<td class="topAlign"><tt>8</tt></td>
<td class="topAlign">Widget gains keyboard focus (<a href="qfocusevent.html">QFocusEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.FocusOut</tt></td>
<td class="topAlign"><tt>9</tt></td>
<td class="topAlign">Widget loses keyboard focus (<a href="qfocusevent.html">QFocusEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.FontChange</tt></td>
<td class="topAlign"><tt>97</tt></td>
<td class="topAlign">Widget's font has changed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.GrabKeyboard</tt></td>
<td class="topAlign"><tt>188</tt></td>
<td class="topAlign">Item gains keyboard grab (<a href="qgraphicsitem.html">QGraphicsItem</a> only).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.GrabMouse</tt></td>
<td class="topAlign"><tt>186</tt></td>
<td class="topAlign">Item gains mouse grab (<a href="qgraphicsitem.html">QGraphicsItem</a> only).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.GraphicsSceneContextMenu</tt></td>
<td class="topAlign"><tt>159</tt></td>
<td class="topAlign">Context popup menu over a graphics scene
(<a href="qgraphicsscenecontextmenuevent.html">QGraphicsSceneContextMenuEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.GraphicsSceneDragEnter</tt></td>
<td class="topAlign"><tt>164</tt></td>
<td class="topAlign">The cursor enters a graphics scene during a
drag and drop operation (<a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.GraphicsSceneDragLeave</tt></td>
<td class="topAlign"><tt>166</tt></td>
<td class="topAlign">The cursor leaves a graphics scene during a
drag and drop operation (<a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.GraphicsSceneDragMove</tt></td>
<td class="topAlign"><tt>165</tt></td>
<td class="topAlign">A drag and drop operation is in progress over
a scene (<a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.GraphicsSceneDrop</tt></td>
<td class="topAlign"><tt>167</tt></td>
<td class="topAlign">A drag and drop operation is completed over a
scene (<a href="qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.GraphicsSceneHelp</tt></td>
<td class="topAlign"><tt>163</tt></td>
<td class="topAlign">The user requests help for a graphics scene
(<a href="qhelpevent.html">QHelpEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.GraphicsSceneHoverEnter</tt></td>
<td class="topAlign"><tt>160</tt></td>
<td class="topAlign">The mouse cursor enters a hover item in a
graphics scene (<a href="qgraphicsscenehoverevent.html">QGraphicsSceneHoverEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.GraphicsSceneHoverLeave</tt></td>
<td class="topAlign"><tt>162</tt></td>
<td class="topAlign">The mouse cursor leaves a hover item in a
graphics scene (<a href="qgraphicsscenehoverevent.html">QGraphicsSceneHoverEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.GraphicsSceneHoverMove</tt></td>
<td class="topAlign"><tt>161</tt></td>
<td class="topAlign">The mouse cursor moves inside a hover item in
a graphics scene (<a href="qgraphicsscenehoverevent.html">QGraphicsSceneHoverEvent</a>).</td>
</tr>
<tr>
<td class="topAlign">
<tt>QEvent.GraphicsSceneMouseDoubleClick</tt></td>
<td class="topAlign"><tt>158</tt></td>
<td class="topAlign">Mouse press again (double click) in a graphics
scene (<a href="qgraphicsscenemouseevent.html">QGraphicsSceneMouseEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.GraphicsSceneMouseMove</tt></td>
<td class="topAlign"><tt>155</tt></td>
<td class="topAlign">Move mouse in a graphics scene (<a href="qgraphicsscenemouseevent.html">QGraphicsSceneMouseEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.GraphicsSceneMousePress</tt></td>
<td class="topAlign"><tt>156</tt></td>
<td class="topAlign">Mouse press in a graphics scene (<a href="qgraphicsscenemouseevent.html">QGraphicsSceneMouseEvent</a>).</td>
</tr>
<tr>
<td class="topAlign">
<tt>QEvent.GraphicsSceneMouseRelease</tt></td>
<td class="topAlign"><tt>157</tt></td>
<td class="topAlign">Mouse release in a graphics scene (<a href="qgraphicsscenemouseevent.html">QGraphicsSceneMouseEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.GraphicsSceneMove</tt></td>
<td class="topAlign"><tt>182</tt></td>
<td class="topAlign">Widget was moved (<a href="qgraphicsscenemoveevent.html">QGraphicsSceneMoveEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.GraphicsSceneResize</tt></td>
<td class="topAlign"><tt>181</tt></td>
<td class="topAlign">Widget was resized (<a href="qgraphicssceneresizeevent.html">QGraphicsSceneResizeEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.GraphicsSceneWheel</tt></td>
<td class="topAlign"><tt>168</tt></td>
<td class="topAlign">Mouse wheel rolled in a graphics scene
(<a href="qgraphicsscenewheelevent.html">QGraphicsSceneWheelEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.Hide</tt></td>
<td class="topAlign"><tt>18</tt></td>
<td class="topAlign">Widget was hidden (<a href="qhideevent.html">QHideEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.HideToParent</tt></td>
<td class="topAlign"><tt>27</tt></td>
<td class="topAlign">A child widget has been hidden.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.HoverEnter</tt></td>
<td class="topAlign"><tt>127</tt></td>
<td class="topAlign">The mouse cursor enters a hover widget
(<a href="qhoverevent.html">QHoverEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.HoverLeave</tt></td>
<td class="topAlign"><tt>128</tt></td>
<td class="topAlign">The mouse cursor leaves a hover widget
(<a href="qhoverevent.html">QHoverEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.HoverMove</tt></td>
<td class="topAlign"><tt>129</tt></td>
<td class="topAlign">The mouse cursor moves inside a hover widget
(<a href="qhoverevent.html">QHoverEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.IconDrag</tt></td>
<td class="topAlign"><tt>96</tt></td>
<td class="topAlign">The main icon of a window has been dragged
away (<a href="qicondragevent.html">QIconDragEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.IconTextChange</tt></td>
<td class="topAlign"><tt>101</tt></td>
<td class="topAlign">Widget's icon text has been changed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.InputMethod</tt></td>
<td class="topAlign"><tt>83</tt></td>
<td class="topAlign">An input method is being used (<a href="qinputmethodevent.html">QInputMethodEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.KeyPress</tt></td>
<td class="topAlign"><tt>6</tt></td>
<td class="topAlign">Key press (<a href="qkeyevent.html">QKeyEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.KeyRelease</tt></td>
<td class="topAlign"><tt>7</tt></td>
<td class="topAlign">Key release (<a href="qkeyevent.html">QKeyEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.LanguageChange</tt></td>
<td class="topAlign"><tt>89</tt></td>
<td class="topAlign">The application translation changed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.LayoutDirectionChange</tt></td>
<td class="topAlign"><tt>90</tt></td>
<td class="topAlign">The direction of layouts changed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.LayoutRequest</tt></td>
<td class="topAlign"><tt>76</tt></td>
<td class="topAlign">Widget layout needs to be redone.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.Leave</tt></td>
<td class="topAlign"><tt>11</tt></td>
<td class="topAlign">Mouse leaves widget's boundaries.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.LeaveEditFocus</tt></td>
<td class="topAlign"><tt>151</tt></td>
<td class="topAlign">An editor widget loses focus for editing.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.LeaveWhatsThisMode</tt></td>
<td class="topAlign"><tt>125</tt></td>
<td class="topAlign">Send to toplevel widgets when the application
leaves "What's This?" mode.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.LocaleChange</tt></td>
<td class="topAlign"><tt>88</tt></td>
<td class="topAlign">The system locale has changed.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QEvent.NonClientAreaMouseButtonDblClick</tt></td>
<td class="topAlign"><tt>176</tt></td>
<td class="topAlign">A mouse double click occurred outside the
client area.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QEvent.NonClientAreaMouseButtonPress</tt></td>
<td class="topAlign"><tt>174</tt></td>
<td class="topAlign">A mouse button press occurred outside the
client area.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QEvent.NonClientAreaMouseButtonRelease</tt></td>
<td class="topAlign"><tt>175</tt></td>
<td class="topAlign">A mouse button release occurred outside the
client area.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.NonClientAreaMouseMove</tt></td>
<td class="topAlign"><tt>173</tt></td>
<td class="topAlign">A mouse move occurred outside the client
area.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.MacSizeChange</tt></td>
<td class="topAlign"><tt>177</tt></td>
<td class="topAlign">The user changed his widget sizes (Mac OS X
only).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.MenubarUpdated</tt></td>
<td class="topAlign"><tt>153</tt></td>
<td class="topAlign">The window's menu bar has been updated.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.MetaCall</tt></td>
<td class="topAlign"><tt>43</tt></td>
<td class="topAlign">An asynchronous method invocation via <a href="qmetaobject.html#invokeMethod">QMetaObject.invokeMethod</a>().</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.ModifiedChange</tt></td>
<td class="topAlign"><tt>102</tt></td>
<td class="topAlign">Widgets modification state has been
changed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.MouseButtonDblClick</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">Mouse press again (<a href="qmouseevent.html">QMouseEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.MouseButtonPress</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">Mouse press (<a href="qmouseevent.html">QMouseEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.MouseButtonRelease</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">Mouse release (<a href="qmouseevent.html">QMouseEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.MouseMove</tt></td>
<td class="topAlign"><tt>5</tt></td>
<td class="topAlign">Mouse move (<a href="qmouseevent.html">QMouseEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.MouseTrackingChange</tt></td>
<td class="topAlign"><tt>109</tt></td>
<td class="topAlign">The mouse tracking state has changed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.Move</tt></td>
<td class="topAlign"><tt>13</tt></td>
<td class="topAlign">Widget's position changed (<a href="qmoveevent.html">QMoveEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.Paint</tt></td>
<td class="topAlign"><tt>12</tt></td>
<td class="topAlign">Screen update necessary (<a href="qpaintevent.html">QPaintEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.PaletteChange</tt></td>
<td class="topAlign"><tt>39</tt></td>
<td class="topAlign">Palette of the widget changed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.ParentAboutToChange</tt></td>
<td class="topAlign"><tt>131</tt></td>
<td class="topAlign">The widget parent is about to change.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.ParentChange</tt></td>
<td class="topAlign"><tt>21</tt></td>
<td class="topAlign">The widget parent has changed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.Polish</tt></td>
<td class="topAlign"><tt>75</tt></td>
<td class="topAlign">The widget is polished.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.PolishRequest</tt></td>
<td class="topAlign"><tt>74</tt></td>
<td class="topAlign">The widget should be polished.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.QueryWhatsThis</tt></td>
<td class="topAlign"><tt>123</tt></td>
<td class="topAlign">The widget should accept the event if it has
"What's This?" help.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QEvent.RequestSoftwareInputPanel</tt></td>
<td class="topAlign"><tt>199</tt></td>
<td class="topAlign">A widget wants to open a software input panel
(SIP).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.Resize</tt></td>
<td class="topAlign"><tt>14</tt></td>
<td class="topAlign">Widget's size changed (<a href="qresizeevent.html">QResizeEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.Shortcut</tt></td>
<td class="topAlign"><tt>117</tt></td>
<td class="topAlign">Key press in child for shortcut key handling
(<a href="qshortcutevent.html">QShortcutEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.ShortcutOverride</tt></td>
<td class="topAlign"><tt>51</tt></td>
<td class="topAlign">Key press in child, for overriding shortcut
key handling (<a href="qkeyevent.html">QKeyEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.Show</tt></td>
<td class="topAlign"><tt>17</tt></td>
<td class="topAlign">Widget was shown on screen (<a href="qshowevent.html">QShowEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.ShowToParent</tt></td>
<td class="topAlign"><tt>26</tt></td>
<td class="topAlign">A child widget has been shown.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.SockAct</tt></td>
<td class="topAlign"><tt>50</tt></td>
<td class="topAlign">Socket activated, used to implement <a href="qsocketnotifier.html">QSocketNotifier</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.StateMachineSignal</tt></td>
<td class="topAlign"><tt>192</tt></td>
<td class="topAlign">A signal delivered to a state machine
(<a href="qstatemachine-signalevent.html">QStateMachine.SignalEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.StateMachineWrapped</tt></td>
<td class="topAlign"><tt>193</tt></td>
<td class="topAlign">The event is a wrapper for, i.e., contains,
another event (<a href="qstatemachine-wrappedevent.html">QStateMachine.WrappedEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.StatusTip</tt></td>
<td class="topAlign"><tt>112</tt></td>
<td class="topAlign">A status tip is requested (<a href="qstatustipevent.html">QStatusTipEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.StyleChange</tt></td>
<td class="topAlign"><tt>100</tt></td>
<td class="topAlign">Widget's style has been changed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.TabletMove</tt></td>
<td class="topAlign"><tt>87</tt></td>
<td class="topAlign">Wacom tablet move (<a href="qtabletevent.html">QTabletEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.TabletPress</tt></td>
<td class="topAlign"><tt>92</tt></td>
<td class="topAlign">Wacom tablet press (<a href="qtabletevent.html">QTabletEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.TabletRelease</tt></td>
<td class="topAlign"><tt>93</tt></td>
<td class="topAlign">Wacom tablet release (<a href="qtabletevent.html">QTabletEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.OkRequest</tt></td>
<td class="topAlign"><tt>94</tt></td>
<td class="topAlign">Ok button in decoration pressed. Supported
only for Windows CE.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.TabletEnterProximity</tt></td>
<td class="topAlign"><tt>171</tt></td>
<td class="topAlign">Wacom tablet enter proximity event (<a href="qtabletevent.html">QTabletEvent</a>), sent to <a href="qapplication.html">QApplication</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.TabletLeaveProximity</tt></td>
<td class="topAlign"><tt>172</tt></td>
<td class="topAlign">Wacom tablet leave proximity event (<a href="qtabletevent.html">QTabletEvent</a>), sent to <a href="qapplication.html">QApplication</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.Timer</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">Regular timer events (<a href="qtimerevent.html">QTimerEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.ToolBarChange</tt></td>
<td class="topAlign"><tt>120</tt></td>
<td class="topAlign">The toolbar button is toggled on Mac OS
X.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.ToolTip</tt></td>
<td class="topAlign"><tt>110</tt></td>
<td class="topAlign">A tooltip was requested (<a href="qhelpevent.html">QHelpEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.ToolTipChange</tt></td>
<td class="topAlign"><tt>184</tt></td>
<td class="topAlign">The widget's tooltip has changed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.UngrabKeyboard</tt></td>
<td class="topAlign"><tt>189</tt></td>
<td class="topAlign">Item loses keyboard grab (<a href="qgraphicsitem.html">QGraphicsItem</a> only).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.UngrabMouse</tt></td>
<td class="topAlign"><tt>187</tt></td>
<td class="topAlign">Item loses mouse grab (<a href="qgraphicsitem.html">QGraphicsItem</a> only).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.UpdateLater</tt></td>
<td class="topAlign"><tt>78</tt></td>
<td class="topAlign">The widget should be queued to be repainted at
a later time.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.UpdateRequest</tt></td>
<td class="topAlign"><tt>77</tt></td>
<td class="topAlign">The widget should be repainted.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.WhatsThis</tt></td>
<td class="topAlign"><tt>111</tt></td>
<td class="topAlign">The widget should reveal "What's This?" help
(<a href="qhelpevent.html">QHelpEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.WhatsThisClicked</tt></td>
<td class="topAlign"><tt>118</tt></td>
<td class="topAlign">A link in a widget's "What's This?" help was
clicked.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.Wheel</tt></td>
<td class="topAlign"><tt>31</tt></td>
<td class="topAlign">Mouse wheel rolled (<a href="qwheelevent.html">QWheelEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.WinEventAct</tt></td>
<td class="topAlign"><tt>132</tt></td>
<td class="topAlign">A Windows-specific activation event has
occurred.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.WindowActivate</tt></td>
<td class="topAlign"><tt>24</tt></td>
<td class="topAlign">Window was activated.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.WindowBlocked</tt></td>
<td class="topAlign"><tt>103</tt></td>
<td class="topAlign">The window is blocked by a modal dialog.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.WindowDeactivate</tt></td>
<td class="topAlign"><tt>25</tt></td>
<td class="topAlign">Window was deactivated.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.WindowIconChange</tt></td>
<td class="topAlign"><tt>34</tt></td>
<td class="topAlign">The window's icon has changed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.WindowStateChange</tt></td>
<td class="topAlign"><tt>105</tt></td>
<td class="topAlign">The <a href="qwidget.html#windowState">window's state</a> (minimized, maximized
or full-screen) has changed (<a href="qwindowstatechangeevent.html">QWindowStateChangeEvent</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.WindowTitleChange</tt></td>
<td class="topAlign"><tt>33</tt></td>
<td class="topAlign">The window title has changed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.WindowUnblocked</tt></td>
<td class="topAlign"><tt>104</tt></td>
<td class="topAlign">The window is unblocked after a modal dialog
exited.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.ZOrderChange</tt></td>
<td class="topAlign"><tt>126</tt></td>
<td class="topAlign">The widget's z-order has changed. This event
is never sent to top level windows.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.KeyboardLayoutChange</tt></td>
<td class="topAlign"><tt>169</tt></td>
<td class="topAlign">The keyboard layout has changed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.DynamicPropertyChange</tt></td>
<td class="topAlign"><tt>170</tt></td>
<td class="topAlign">A dynamic property was added, changed or
removed from the object.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.TouchBegin</tt></td>
<td class="topAlign"><tt>194</tt></td>
<td class="topAlign">Beginning of a sequence of touch-screen and/or
track-pad events (<a href="qtouchevent.html">QTouchEvent</a>)</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.TouchUpdate</tt></td>
<td class="topAlign"><tt>195</tt></td>
<td class="topAlign">Touch-screen event (<a href="qtouchevent.html">QTouchEvent</a>)</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.TouchEnd</tt></td>
<td class="topAlign"><tt>196</tt></td>
<td class="topAlign">End of touch-event sequence (<a href="qtouchevent.html">QTouchEvent</a>)</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.WinIdChange</tt></td>
<td class="topAlign"><tt>203</tt></td>
<td class="topAlign">The window system identifer for this native
widget has changed</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.Gesture</tt></td>
<td class="topAlign"><tt>198</tt></td>
<td class="topAlign">A gesture was triggered (<a href="qgestureevent.html">QGestureEvent</a>)</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.GestureOverride</tt></td>
<td class="topAlign"><tt>202</tt></td>
<td class="topAlign">A gesture override was triggered (<a href="qgestureevent.html">QGestureEvent</a>)</td>
</tr>
</table>
<p>User events should have values between <tt>User</tt> and
<tt>MaxUser</tt>:</p>
<table class="valuelist">
<tr class="even" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.User</tt></td>
<td class="topAlign"><tt>1000</tt></td>
<td class="topAlign">User-defined event.</td>
</tr>
<tr>
<td class="topAlign"><tt>QEvent.MaxUser</tt></td>
<td class="topAlign"><tt>65535</tt></td>
<td class="topAlign">Last user event ID.</td>
</tr>
</table>
<p>For convenience, you can use the <a href="qevent.html#registerEventType">registerEventType</a>() function to
register and reserve a custom event type for your application.
Doing so will allow you to avoid accidentally re-using a custom
event type already in use elsewhere in your application.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QEvent" />QEvent.__init__ (<i>self</i>, <a href="qevent.html#Type-enum">Type</a>&#160;<i>type</i>)</h3><p>Contructs an event object of type <i>type</i>.</p>


<h3 class="fn"><a name="QEvent-2" />QEvent.__init__ (<i>self</i>, <a href="qevent.html">QEvent</a>)</h3><h3 class="fn"><a name="accept" />QEvent.accept (<i>self</i>)</h3><p>Sets the accept flag of the event object, the equivalent of
calling setAccepted(true).</p>
<p>Setting the accept parameter indicates that the event receiver
wants the event. Unwanted events might be propagated to the parent
widget.</p>
<p><b>See also</b> <a href="qevent.html#ignore">ignore</a>().</p>


<h3 class="fn"><a name="ignore" />QEvent.ignore (<i>self</i>)</h3><p>Clears the accept flag parameter of the event object, the
equivalent of calling setAccepted(false).</p>
<p>Clearing the accept parameter indicates that the event receiver
does not want the event. Unwanted events might be propagated to the
parent widget.</p>
<p><b>See also</b> <a href="qevent.html#accept">accept</a>().</p>


<h3 class="fn"><a name="isAccepted" />bool QEvent.isAccepted (<i>self</i>)</h3><h3 class="fn"><a name="registerEventType" />int QEvent.registerEventType (int&#160;<i>hint</i>&#160;=&#160;-1)</h3><p>Registers and returns a custom event type. The <i>hint</i>
provided will be used if it is available, otherwise it will return
a value between <a href="qevent.html#Type-enum">QEvent.User</a>
and <a href="qevent.html#Type-enum">QEvent.MaxUser</a> that has
not yet been registered. The <i>hint</i> is ignored if its value is
not between <a href="qevent.html#Type-enum">QEvent.User</a> and
<a href="qevent.html#Type-enum">QEvent.MaxUser</a>.</p>
<p><b>Note:</b> This function is <a href="threads-reentrancy.html#thread-safe">thread-safe</a>.</p>
<p>This function was introduced in Qt 4.4.</p>


<h3 class="fn"><a name="setAccepted" />QEvent.setAccepted (<i>self</i>, bool&#160;<i>accepted</i>)</h3><h3 class="fn"><a name="spontaneous" />bool QEvent.spontaneous (<i>self</i>)</h3><p>Returns true if the event originated outside the application (a
system event); otherwise returns false.</p>
<p>The return value of this function is not defined for paint
events.</p>


<h3 class="fn"><a name="type" /><a href="qevent.html#Type-enum">Type</a> QEvent.type (<i>self</i>)</h3><p>Returns the event type.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;snapshot-4.9.5-9eb6aac99275 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.3</td></tr></table></div></address></body></html>